s01eaf

s01eaf © Numerical Algorithms Group, 2002.

Purpose

z S01EAF Complex exponential, e

Synopsis

[fun_value,ifail] = s01eaf(z<,ifail>)

Description

 
                                                  z             
 This routine evaluates the exponential function e , taking care 
 to avoid machine overflow, and giving a warning if the result 
 cannot be computed to more than half precision. The function is 
               z  x                                            
 evaluated as e =e (cosy+isiny), where x and y are the real and 
 imaginary parts respectively of z.
 
 Since cosy and siny are less than or equal to 1 in magnitude, it 
                   x                        x         x         
 is possible that e  may overflow although e cosy or e siny does 
                                                      x+ln|cosy|
 not. In this case the alternative formula sign(cosy)e           
 is used for the real part of the result, and 
            x+ln|siny|                                          
 sign(siny)e           for the imaginary part. If either part of 
 the result still overflows, a warning is returned through 
 parameter IFAIL.
 
 If Im z is too large, precision may be lost in the evaluation of 
 siny and cosy. Again, a warning is returned through IFAIL.
 

Parameters

s01eaf

Required Input Arguments:

z                                     complex

Optional Input Arguments:                       <Default>

ifail                                 integer  -1

Output Arguments:

ifail                                 integer